<!doctype html>
<html ng-app="app">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../build/common/base.css" rel="stylesheet">
<script type="text/javascript" src="../../build/common/base.js"></script>
<script type="text/javascript" src="../../build/common/ngEdit.js"></script>
</head>
<script type="text/javascript">
	var id = $.getParam("id");
	var app = angular.module('app', [ 'baseDirective' ]);
	app.controller("ctrl", [ '$scope', 'baseService','ArrayToolService', 
		function($scope, baseService,ArrayToolService) {
			$scope.ArrayTool = ArrayToolService;
			$scope.isSaveEd = id;
		
			/**
			 * 数据初始化。
			 */
			$scope.init=function(){
				if(!$scope.data){
					$scope.data={};
				}
			};
			
			
			} ]);

</script>
<body class="panel success" ng-controller="ctrl">
	<!-- 顶部按钮 -->
	<!--  ab-load 去controller 层获取业务数据  -->
	<form name="form" method="post" ab-load="crm/customer/get?id={id}"
		ng-model="data">

		<table class="form-table">
			<tbody>
				<tr class="firstRow">
					<th>客户名称</th>
					<td>
					{{data.name}}	
					</td>
				</tr>
				<tr id="typeRadio">
					<th>类型</th>
					<td>
						<span ng-if="data.type==0">个人客户</span>
						<span ng-if="data.type==1">公海客户</span>
					</td>
				</tr>
				<!-- <tr>
					<th>
						<span>所有者</span>
						<span class="required">*</span>
					</th>
					<td>
						<span ng-repeat="possesser in data.possesserList" style="margin-right: 10px" class="label label-danger"> {{possesser.fullname}}
						<button href="javascript:void(0)" class="btn btn-link btn-default btn-xs" ng-click="ArrayTool.remove(possesser,data.possesserList)">×</button></span>
						<span class="btn  btn-sm btn-primary fa fa-search" ng-click="selectPossesserList()">选择</span> 
					</td>
				</tr> -->
			
				<tr>
					<th>公司地址</th>
					<td>
						{{data.address}}		
					</td>
				</tr>
				<tr>
					<th>行业</th>
					<td>
						{{data.industry}}
					</td>
				</tr>
				<tr>
					<th>公司网址</th>
					<td>
						{{data.website}}	
					</td>
				</tr>
				<tr>
					<th>微信公众号</th>
					<td>
						{{data.wechatOfficialAccount}}	
					</td>
				</tr>
				<tr>
					<th>联系人姓名</th>
					<td>
						{{data.contactName}}	
					</td>
				</tr>
				<tr>
					<th>联系人生日</th>
					<td>
						{{data.contactBirthday}}
					</td>
				</tr>
				<tr>
					<th>联系人职务</th>
					<td>
						{{data.contactPosition}}
					</td>
				</tr>
				<tr>
					<th>联系人电话</th>
					<td>
						{{data.contactNumber}}
					</td>
				</tr>
				<tr>
					<th>传真号码</th>
					<td>
						{{data.faxNumber}}	
					</td>
				</tr>
				<tr>
					<th>电子邮件</th>
					<td>
						{{data.email}}
					</td>
				</tr>
				<tr>
					<th>客户状态</th>
					<td><span type="text" class=" input-div"
						ng-model="data.state" ab-validate="{}" desc="客户状态"
						ab-combox="data.state" dict-key="khzt" ></span></td>
				</tr>
				<tr>
					<th>客户级别</th>
					<td><span type="text" class=" input-div"
						ng-model="data.level" ab-validate="{}" desc="客户级别"
						ab-combox="data.level" dict-key="khjb" ></span></td>
				</tr>
				<tr>
					<th>成熟度</th>
					<td><span type="text" class=" input-div"
						ng-model="data.maturity" ab-validate="{}" desc="成熟度"
						ab-combox="data.maturity" dict-key="khcsd" ></span></td>
				</tr>
				<tr>
					<th>客户来源</th>
					<td><span type="text" class=" input-div"
						ng-model="data.source" ab-validate="{}" desc="客户来源"
						ab-combox="data.source" dict-key="khly" ></span></td>
				</tr>
				<tr>
					<th>主营项目</th>
					<td>
						{{data.mainProject}}
					</td>
				</tr>
				<tr>
					<th>备注</th>
					<td>
						{{data.remark}}
					</td>
				</tr>
				<!-- <tr>
					<th>最后跟进时间</th>
					<td><input class=" form-control"
						ng-model="data.lastFollowupTime" ab-validate="{}"
						desc="最后跟进时间"
						ab-date="yyyy-MM-dd HH:mm:ss" /></td>
				</tr> -->
				<!-- <tr>
					<th>类型</th>
					<td><div ng-model="data.type"
							ab-validate="{}" desc="类型">
							<label class=" radio-inline"><input type="radio"
								ng-model="data.type" value="0" />个人客户</label><label
								class=" radio-inline"><input type="radio"
								ng-model="data.type" value="1" />公海客户</label>
						</div></td>
				</tr> -->
				
				<tr>
					<th>
						<span>产品:</span>
					</th>
					<td>
						<span ng-repeat="relation in data.customerRelationList |filter:{type:'customerProduct'}" style="margin-right: 10px" class="label label-danger"> {{relation.productName}}
						</span>
					</td>
				</tr>
			</tbody>
		</table>
	</form>
</body>
</html>